package com.linb.pan.lock.local;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.integration.support.locks.DefaultLockRegistry;
import org.springframework.integration.support.locks.LockRegistry;

@SpringBootConfiguration
@Slf4j
public class LocalLockConfig {

    @Bean
    public LockRegistry localLockRegistry() {
        //使用默认的lockRegistry
        LockRegistry lockRegistry = new DefaultLockRegistry();
        log.info("本地锁加载成功");
        return lockRegistry;
    }

}
